/*****************************************************************
 *@Copyright all rights reserved ? 2014 Yuga
 *@author YUga studio
 *Contact: zengkang007@gmail.com
 *****************************************************************/
package com.oplink.webbase.modules.invoicing.entity;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.oplink.webbase.common.persistence.DataEntity;
import com.oplink.webbase.modules.sys.entity.User;
/**
 * 告警Entity
 * @author YUga studio
 * @version 2015-01-12
 */
@Entity
@Table(name = "invoicing_costomer")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Costomer extends DataEntity {
	
	private static final long serialVersionUID = 1L;
	private User user;
	private int sort; // ����
	private Integer customerId; // 客户编号
	private String customerName; // 客户姓名
	private String address; // 地址
	private String telephone; // 电话
	private String email; // 邮箱
	private Integer creditRating; // 信用度
	private Integer requireGoodsId; // 所需商品ID
	private String profile; // 简介

    
	  public Integer getCustomerId() {
        return customerId;
      }
      
      public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
      }
    
	  public String getCustomerName() {
        return customerName;
      }
      
      public void setCustomerName(String customerName) {
        this.customerName = customerName;
      }
    
	  public String getAddress() {
        return address;
      }
      
      public void setAddress(String address) {
        this.address = address;
      }
    
	  public String getTelephone() {
        return telephone;
      }
      
      public void setTelephone(String telephone) {
        this.telephone = telephone;
      }
    
	  public String getEmail() {
        return email;
      }
      
      public void setEmail(String email) {
        this.email = email;
      }
    
	  public Integer getCreditRating() {
        return creditRating;
      }
      
      public void setCreditRating(Integer creditRating) {
        this.creditRating = creditRating;
      }
    
	  public Integer getRequireGoodsId() {
        return requireGoodsId;
      }
      
      public void setRequireGoodsId(Integer requireGoodsId) {
        this.requireGoodsId = requireGoodsId;
      }
    
	  public String getProfile() {
        return profile;
      }
      
      public void setProfile(String profile) {
        this.profile = profile;
      }
    
    
    // JPA ����USER_ID�еĶ��һ��ϵ����
	@ManyToOne
	@JoinColumn(name = "user_id")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	} 
	
	@Transient
	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}
}
